home *** CD-ROM | disk | FTP | other *** search
Text File | 1986-11-17 | 56.3 KB | 1,971 lines |
- Purpose: Instructs DOS to re-route a disk request for a specific drive to
- another drive.
-
- Syntax: [d:]ASSIGN [x[=]y[...]]
-
- Comments: Specify the parameters:
-
- x to specify the current drive to which requests are sent.
-
- y to specify the drive letter to which you now want disk requests
- to be sent.
-
- Example: A>assign b=c means that A>dir b will list the directories of c.
-
- Note: If this command is entered without parameters the system will
- use the normal drive assignments.
-
- WARNING: DISKCOPY and DISKCOMP ignore ASSIGN commands.
- Purpose: Allows you to set or reset the archive bit and the Read-Only file
- attribute, or to display the current setting of those attributes.
-
- Syntax: [d:]ATTRIB [+R][-R][+A][-A] [d:][path]filename[.ext]
-
- Comments: Specify the parameters:
-
- +R to set the file's read attribute to read-only.
-
- -R to turn off the file's read-only attribute.
-
- +A to turn on the file's archive bit.
-
- -A to turn off the file's archive bit.
-
- [d:][path]filename[.ext] to specify the file for which you want to
- change the attribute. Wildcard characters are allowed.
-
- Examples: See the format prompt.
- The following are examples.
-
- A>ATTRIB +r -a file1.ext
-
- This command sets the file attributes to read-only and resets the
- archive bit.
-
- A>ATTRIB file.exp
-
- This command displays the current attribute settings eg.
-
- R A:\file.exp
-
-
- NOTE: Changing the archive bit affects BACKUP /M and XCOPY /M. If the
- bit is set the file is copied; if the archive bit is reset it is
- not.
- Purpose: Backs up one or more files from one disk to another.
- The drive specifiers of the disks must be different.
-
- Syntax: [d:]BACKUP d:[path][filename[.ext]] d:[/S][/M][/A][/D:mm-dd-yy]
-
- Comments: Specify the parameters:
-
- d:[path][filename[.ext]] specifies the source files to be backed up.
-
- d: specifies the target drive.
-
- /S to backup subdirectories in addition to those specified.
-
- /M to backup files modified since the last backup.
-
- /A to add the files to those already on the backup disk.
-
- /D:mm-dd-yy to backup files modified on or after this date.
-
- Example: see syntax prompt.
-
- This switch adds the backup files to a diskette that has already been used in a
- backup operation.
-
- WARNING: If this switch is not used all files on the diskette are erased before
- the new files are written to the diskette.
- syntax /D:month(1-12)-day(1-31)-year(80-99)
-
- This switch enables you to backup files modified on or after a certain
- date. The date syntax is the same as for the DATE command.
-
- For example
-
- A>BACKUP C: A:/D:12-25-82
-
- This command will backup all of the files modified on or after
- christmas day 1982.
- This switch backs up all files matching the file specification that have been
- modified since the last backup was performed.
-
- Use this parameter to avoid backing up files that never change.
-
- DOS can recognise these files because of an indicator in each file's
- directory entry that is set by DOS whenever a file is written to.
- This switch will cause the files in the specified directory and all of the
- subdirectories to be backed up.
-
- Without this /S switch only the files in the specified directory will be backed
- up.
- The following are examples.
-
- A>backup C: B:/S
-
- This command backs up all files, starting with the working directory
- of C:, and all subdirectories to the diskette in drive B:.
-
- C>backup \EXAMPLE A:
-
- This command backs up all files in the EXAMPLE directory of the fixed
- disk drive to the diskette in drive A:.
-
- C>backup \EXAMPLES\*.DBF A:
-
- This command backs up all files in the EXAMPLE directory of the fixed
- disk drive with a extension of DBF.
- Purpose: Allows you to instruct DOS to check for control break whenever
- a program requests DOS to perform any functions.
-
- Syntax: BREAK = [ON | OFF ]
-
- Comments: The default value is set at BREAK = OFF. This means that DOS checks
- for Ctrl-Break being entered only during:
-
- * Standard input/output operations.
-
- * Standard print operations.
-
- * Standard auxiliary operations.
-
- If you want DOS to check for Ctrl-Break whenever it is requested,
- set BREAK = ON.
-
- This allows you to break out of a program that produces little or no
- standard device operations (such as a compiler ).
-
- Note: Typing BREAK without parameters will display the current state.
- These commands can be used inside a batch file.
-
- ECHO To turn echo on or off.
- FOR To repeat a command for several variables.
- GOTO To redirect the command to a label.
- IF To execute commands depending on a condition.
- PAUSE To suspend execution of batch file.
- REM To display comments during batch file execution.
- SHIFT To access more than 10 parameters.
- Purpose: To set the number of disk buffers allocated in memory at startup.
-
- Syntax: BUFFERS = x
-
- Comments: The x is a number between 1 and 99 and specifies the number of
- disk buffers allocated by DOS in memory when it starts. The
- default value is 2,(3 for the AT) and x will remain in effect
- until DOS is restarted.
-
- Increasing the number of buffers can reduce in some circumstances
- the time DOS takes to read a record from disk; DOS will see if
- the record is already in the buffer.
- Syntax: DEBUG [d:][path][filename[.ext]] [param1] [param2]
-
- Purpose: To help find bugs in a program.
-
- Comments: This program will allow you to test your program under a controlled
- environment where you can monitor progress and change variables and
- the program without the need to reassemble.
-
- You can also load, alter or display a file.
-
- If no filename is given you must use the current memory contents or
- the NAME and LOAD commands to load a file into memory.
-
- The parameters are for use by the program being tested.
-
- for example DEBUG DISKCOPY A: B:
- BREAK Turns extended ^break check on or off.
- BUFFERS To change number of disk buffers.
- COUNTRY To specify date/time format for a country. DOS 3.20
- DEVICE To tell DOS to load device driver.
- FCBS To set number of open control blocks. DOS 3.20
- FILES To specify number of files open at one time.
- LASTDRIVE To set maximum number of drives. DOS 3.20
- SHELL To specify alternative command processor.
-
- Purpose: To change the working directory of the specified or default
- drive, or to display the current working directory.
-
- Syntax: CHDIR [[d:]path] or CD [[d:]path]
-
- Comments: Specify the parameters:
-
- [d:] to specify the drive specifier of the disk whose current
- working directory you want to change or display.
-
- [path] to specify the desired directory pathname. MAX 63 characters.
-
- Type CD with no parameters to display the current working directory.
-
- Example: A>cd \ changes the current working directory of the default drive
- to its root directory. See syntax prompt.
-
- Note: CD .. is a shorthand notation for the parent directory.
-
- The following are examples.
-
- A>CD ..
-
- This command will change the directory to the parent of the current
- directory.
-
- C>CHDIR CURRENT
-
- This command will change the directory to CURRENT, where CURRENT
- must be in the current directory.
-
- B>CD
-
- This command will display your current working directory.
-
- A> CD \
-
- This command will change the directory to the root directory.
- Purpose: Analyses the directories, files,and the File Allocation Table on the
- designated or default drive and produces a disk and memory status
- report.
-
- Syntax: [d:]CHKDSK [d:][path][filename[.ext]][/F][/V]
-
- Comments: Specify the parameters:
-
- [d:][path][filename[.ext]] to specify the filename.If you specify
- the file name,CHKDSK displays the number of non-contiguous areas
- that this file occupies.
-
- /F to have CHKDSK fix errors that are found in the directory or File
- Allocation Table. If /F is not specified, CHKDSK prepares to
- correct the disk and reports errors so that you can analyse the
- possible results, but does not make the corrections.
-
- /V to display progress file by file via the screen.
-
- Examples: see syntax prompt.
-
- Some errors found in the directory structure will be corrected and others
- will be reported and corrected with a Y response to a prompt. If /F is not
- specified the errors will still be reported but no corrections will be made.
-
- If CHKDSK finds lost allocation units on the disk, it asks if you wish to
- recover the lost data into files. If you say yes and /F has been chosen then
- CHKDSK recovers each lost chain into a file of the form:
-
- FILEnnnn.CHK where nnnn is a sequential number starting at 0000.
- In DOS 3.2 the file does not have to be in the working directory.
-
- If this option is chosen then the file must reside in the current working
- directory. The number of non-contiguous areas occupied by the file will be
- reported.
-
- This command can be used to check for badly fragmented disks which can badly
- impair system performance.
-
- eg. CHKDSK *.*
-
- More detailed messages including messages about hidden files are displayed
- indicating how CHKDSK is progressing.
-
- For example the filename and its path are displayed while the directory is
- being checked.
- The following are examples.
-
- A>CHKDSK B: /V
-
- This command will check the diskette in drive B and will display
- messages while it is running.
-
- A>CHKDSK B:TEST.*
-
- This command will check the files on drive B (beginning with TEST ),
- for contiguous blocks.
- Purpose: Clears the display.
-
- Syntax: CLS
-
- Comments: This command clears the display on the standard output device.
- If screen attributes have been selected using the Extended Screen
- and keyboard control functions the attributes remain unchanged.
- The following are examples
-
- A>COMMAND /c dir b:
-
- This command loads a new command processor which executes DIR B: before
- returning to the primary command processor.
-
- NOTE:
-
- The secondary copy inherits the environment of the first copy but
- when it returns control to the primary any changes made during its
- lifetime are ignored.
-
- If /P and /C are used together /P is ignored.
- Syntax: COMMAND [d:][path][/P][/C string][/E:xxxxx]
-
- Comments: specify the parameters.
-
- [d:][path] is the drive and path DOS will search first for the
- COMMAND.COM file. If not found it searches the path from your
- current environment.
-
- [/P] causes the copy of the command processor to become permanent
- in memory.
-
- [/C string ] allows you to pass a string and then exit to the
- primary command processor on completion.
-
- [string] is a command you want to pass to the command processor.
-
- [/E:xxxxx] is a base 10 integer that allows you to set the size
- of the environment.
-
- Examples: see syntax prompt.
- Purpose: Compares the contents of the first set of specified files to the
- contents of the second set of files.
-
- Syntax: [d:]COMP [d:][path][filename[.ext]] [d:][path][filename[.ext]]
-
- Comments: Specify the parameters:
-
- [d:][path][filename[.ext]] to specify the first set of file names
- that you want to compare.
-
- [d:][path][filename[.ext]] to specify the second set of file names
- that you want to compare.
-
- The files are compared byte by byte and mis-matches are displayed
- in an error message.
-
- Notes: The files can be on the same or different drives.
- Wildcard characters are allowed in the filename.
- If parameters are missing you are prompted for them.
-
-
- Example: see syntax prompt.
- The following are examples.
-
- A>COMP A:*.BAS B:*.BAK
-
- This command will compare each file on drive A with the extension BAS
- with the files on drive B with the same name and extension BAK.
-
- A>COMP \ONE \TWO
-
- This command will compare all files in directory ONE in the current
- directory with all files in directory TWO with the same name.
-
- Error messages are of the form:
-
- Compare error at offset 2B
-
- File1 = 36
- File2 = 40
-
- Purpose: Copies one or more files to the specified disk, or transfers
- data between drives.
-
- Syntax: COPY [/A][/B][d:][source] [/A][/B][d:][target][/A][/B][/V]
-
- Comments: The first file specified is the source file.The second file specified
- is the target file. If the second parameter is a directory the files
- are copied without changing their names.
-
- The second file can be given a different name and if the directories
- are the same it must be.
-
- To concatenate add a + between two or more source paths.
-
- /A will copy as an ASCII file ie. upto the first EOF.
-
- /B will copy the entire file based on the directory size.
-
- /V will verify the copy ....this slows the command down.
-
- Examples: see syntax prompt.
-
- When used with sourcespec:
-
- /A Causes the file to be treated as an ASCII (text) file. The file
- is copied up to but not including the first End Of File.
-
- /B Causes the entire file to be copied.
-
- When used with targetspec.
-
- /A Causes an EOF character (Ctrl-Z) to be added to the file.
-
- /B Causes no EOF to be added.
-
- Option 1: Copy with same name.
-
- COPY [d:][path]filename[.ext] d:[path]
-
- In this case the target must be on a different drive or in a
- different directory.
-
- Option 2: Copy with different name.
-
- COPY [d:][path]filename[.ext] d:[path]newfilename[.ext]
-
- Option 3: Copy and combine files.
-
- COPY [d:][path]filename[.ext][/A][/B] [+[d:][path]filename[.ext]
- [/A][/B]...] [d:][path]filename[.ext]][/A][/B][/V]
-
- eg. A>copy a.xyz+b.abc bigfile.txt
- The following are examples.
-
- A>COPY B:TEST.BAS
-
- This command copies TEST.BAS from drive B to default drive A.
-
- A>COPY *.* B:
-
- This command copies all files from drive A to drive B with no name changes.
-
- A>COPY A.BAS+B.BAS
-
- This command appends B.BAS to the end of A.BAS and puts the result in A.BAS.
-
- A>COPY CON TEST.BAS
-
- This command allows you to direct keyboard input into a file. F6 will
- write what you have typed in into the file.
- Purpose: Use to specify the date and time format for a given country. Other
- information, such as the currency symbol and the decimal separator
- are also set using this command.
-
- Note: COUNTRY does not translate text.
-
- Syntax: COUNTRY = xxx
-
- Purpose: xxx is the 3-digit international country code for the telephone
- system. The default value is the U.S. code of 001. The countries
- are listed in the manual. If your country is not listed choose
- the most similar country supported.
- Purpose: To change the standard input /output device to an auxillary
- device, or restores the keyboard and screen as the standard
- input and output devices.
-
- Syntax: CTTY device-name.
-
- Comments: Specify device-name as:
-
- AUX OR COM Primary asynchronous communications port.
- COM2 Secondary communications port.
- CON Keyboard input and screen output.
-
- CTTY accepts the name of any character-oriented device to allow
- you to install your own device drivers. The device must be capable
- of input and output, ie not a printer.
-
- Examples: A>CTTY aux swops to the auxillary device for input/output.
-
- A>CTTY con swops back.
- Comments: Specify AUX, COM1, or COM2 to use that device as the primary
- console.
-
- Specify CON to reset the primary standard input and output
- devices to the primary console.
- Purpose: To enter or change the date known to DOS. The date is recorded when
- you create or change a file.
-
- Syntax: [mm-dd-yy] | [dd-mm-yy] | [yy-mm-dd]
-
- Comments: Specify the parameters:
-
- mm to specify the month. Type 1 or 2 numbers from 1 to 12.
-
- dd to specify the day. Type 1 or 2 numbers from 1 to 31.
-
- yy to specify the year. Type 2 numbers between 80 and 99 or 4
- numbers between 1980 and 1999.
-
- Note: Entering DATE without parameters cause DOS to prompt for them
-
- Current date is day dd-mm-yy
- Enter new date (dd-mm-yy):_
- Purpose: To delete specified files from a disk.
-
- Syntax: [d:]filename[.ext]
-
- Comments: Specify the parameters:
-
- [d:] to specify the drive that contains the file to be deleted.
-
- [path] to specify the directory path that contains the file that you
- want to delete.
-
- filename[.ext] to specify the name of the file you want to be deleted.
-
- Wildcard specifications are allowed.
-
- Note: If no file is given but a path is, *.* is assumed.
-
- Examples: A>ERASE b:file.bat this deletes file.bat on drive B.
- The following are examples.
-
- A>DEL *.BAS
-
- This command will delete all files on drive A with the extension BAS.
-
- A>ERASE \*.*
-
- This command will delete all files in the root directory, but first
- the prompt
-
- Are you sure (Y/N)?
-
- will be displayed. Only Y as a response will continue the command.
-
- A>DEL \PEOPLE\JOHN
-
- This command will delete JOHN from the directory PEOPLE in the root
- directory.
- Purpose: To allow you to direct DOS to load an additional file containing
- a device driver.
-
- Syntax: DEVICE = [d:][path]filename[.ext]
-
- Comments: During startup, DOS loads the file into memory and gives it control
-
- Example: DEVICE = ANSI.SYS
-
- This is placed in the CONFIG.SYS file and loads the extended
- screen and keyboard controls.
-
- Purpose: To list either all the directory entries,or only those for specified
- files.
-
- Syntax: DIR [d:][path][filename[.ext]][/P][/W]
-
- Comments: Specify the parameters:
-
- [d:][path][filename[.ext]] to specify the file's you want to list.
-
- /P to pause the display when the screen is full.
-
- /W to display the directory 4 wide.
-
- Notes: If no parameters are given, all entries in the working directory
- of the default drive are listed.
-
- If a full file specification is given, only the file with that name
- and extension will be listed.
-
- Examples: see syntax prompt.
-
- The following are examples.
-
- A>DIR /W
-
- This command will list the current directory across the screen.
-
- A>DIR .. /P
-
- This command will list the parent directory pausing when the screen is
- full.
-
- A>DIR b: | SORT > PRN
-
- This command will print the directory on B sorted.
- Purpose: Compares the contents of the diskette in the first specified drive
- to the contents of the diskette in the second specified drive.
-
- Syntax: [d:]DISKCOMP [d: [d:]][/1][/8]
-
- Comments: Specify the parameters:
-
- [d:] specifies the source drive.
-
- [d:] specifies the target drive.
-
- /1 compares only the first sides of the diskette.
-
- /8 compares only 8 sectors per track.
-
- Notes: Not for use with fixed disks.
-
- If the drives are the same, are omitted or only the default
- drive is specified a single drive comparison is performed.
-
- Purpose: To copy the contents of one diskette to another, the target
- diskette being FORMATTED where necessary.
-
- NOTE: This command is used only for copying diskettes.
-
- Syntax: [d:]DISKCOPY [d: [d:]][/1]
-
- Comments: Speciy the parameters:
-
- [d:] specifies the source drive.
-
- [d:] specifies the target drive.
-
- /1 copies only the first side of the diskette, regardless of the
- diskette or drive type.
-
- Notes: If your diskette is fragmented use the COPY command.
-
- You can specify the same drive, in which case a one-drive copy
- operation is performed.
-
- If both drives are omitted a one-drive copy is performed on the
- default drive.
-
- Examples: See format prompt.
-
- The following is an example:
-
- A>DISKCOPY A: B:
-
- The screen displays:
-
- Insert source diskette in drive A:
-
- Insert source diskette in drive B:
-
- Strike any key when ready..
-
- This will copy the diskette in drive A to the diskette in drive B.
-
- Purpose: To turn the BATCH ECHO feature ON or OFF.
- It does not interfere with messages produced while the commands
- are executing.
-
- Syntax: ECHO [ON|OFF|MESSAGE]
-
- Comments: Batch commands are normally displayed on the screen as they are read
- from the batch file. ECHO is ON after power-on or system reset. ECHO
- ON displays all the commands on the standard output device as they
- are executed. ECHO OFF stops the display of commands on the screen
- ( including the REM command).
-
- ECHO MESSAGE displays MESSAGE on the standard output device
- regardless of the current ON or OFF state.
-
- If the command is entered without parameters the current status
- is displayed.
-
- Purpose: To create or edit an ASCII file.
-
- Syntax: [d:]EDLIN [d:][path]filename[.ext][/B]
-
- Comments: This is a line text editor that can be used to:
-
- * Create new text files.
-
- * Update text files and create a backup copy of the original.
-
- * Delete, insert or display lines of text from the file.
-
- Each line can be of variable length of up to 253 characters.
-
- The /B switch allows files containing embedded ^Z characters to be
- edited.
-
- Purpose: Converts .EXE files to .COM or .BIN files.
-
- Syntax: [d:]EXE2BIN [d:][path]filename[.ext] [d:][path][filename[.ext]]
-
- Comments: Specify the parameters:
-
- [d:][path]filename[.ext] to specify the input file.
- If you do not specify:
-
- [d:] the default drive is assumed.
-
- [path] the current working directory is assumed.
-
- [.ext] .EXE is assumed as an extension.
-
- [d:][path]filename[.ext] to specify the output file.
- If you do not specify:
-
- [d:] the drive of the input file is assumed.
-
- [path] the current working directory is assumed.
-
- [.ext] .BIN is assumed as an extension.
-
- Examples: See format prompt.
- The following are examples.
-
- A>EXE2BIN NVS.EXE B:NVSQREF.COM
-
- This command will convert NVS.EXE on the default drive A to a file
- called NVSQREF.COM on drive B.
-
- B>A:EXE2BIN NVS
-
- This command will convert NVS.EXE on the default drive B to NVS.BIN
- on the same drive.
-
- By including this in the command DOS will take input from a file
- instead of the screen.
-
- For example.
-
- A>SORT < FILE.TST > PRN
-
- This command will sort the file FILE.TST and send the sorted output
- to the printer.
- Purpose: Allows you to specify the number of file control blocks( FCBs)
- that DOS can have open at anyone time.
-
- Syntax: FCBS = m,n
-
- Comments: The m specifies the total number of files opened by FCBs that can
- be open at any one time. The range of values for m is from 1
- to 255, with a default of 4.
-
- The n specifies the number of files opened by FCBs that cannot be
- closed automatically by DOS if a program tries to have more than
- m files opened by FCBs at one time. The first n files are protected
- from being closed, where n can be between 0 and 255 and 0 is the
- default.
-
- Note: This command does not apply if filesharing is not loaded.
-
-
- See Chapter on "Preparing Your Fixed Disk." in your DOS manual.
- Purpose: To specify the maximum number of files that can be simultaneously
- open at any one time.
-
- Syntax: FILES = x
-
- Comments: The x can be a number between 8 and 255. The default value is
- FILES = 8.
-
- A file name consists of upto eight characters plus an extension of upto
- three characters.
-
- The following are valid characters
-
- A-Z in upper and lower case.
- 0-9
- $ () & ' _ @ # {} % ~ ! -
-
- The * and ? characters can be used as wild cards.
-
- For examples *.LST means any file with extension LST.
- ?HREE.BAS means any file ending in HREE.BAS.
- Purpose: To search for a string of text in the specified file names,
- sending the lines containing a match to the standard output
- device.
-
- Syntax: [d:]FIND [/V][/C][/N]"string" [[d:][path]filename[.ext]..]
-
- Comments: Specify the parameters:
-
- /V to display all lines not containing the specified string.
-
- /C to display the number of lines containing the string in each
- of the files. If specified with /N, /N is ignored.
-
- /N to display the relative line number of each matching line followed
- by the line of text.
-
- Notes: Enclose the string in double quotes(").
-
- Wildcard characters are not allowed.
-
- The file is searched upto the first EOF (Ctrl-Z).
-
- Examples: See format prompt.
- The following is an example.
-
- A>FIND "Fool's Paradise" book1.txt book2.txt
-
- This command displays all lines from the files book1.txt and book2.txt ( In
- that order) that contain the string "Fool's Paradise".
- Purpose: Allows you to repeat a command for several variables.
-
- Syntax: FOR %% variable IN (set) DO command
-
- Comments: The %% variable is sequentially set to each member of set and then
- the command is executed. If the wildcard characters * and ? are used
- in SET, the variable is set to each matching filename from the disk.
- Path names are allowed in set.
-
- Note: %% is only required in BATCH files. To type the FOR
- command at the DOS prompt, only include one %.
-
- Example: A>for %%h in (file1,file2) do dir %%h
-
- This will display one directory listing for file1, followed
- by a listing for file2.
-
- Purpose: Initialises the disk in the designated drive to a recording format
- acceptable to DOS; analyses the entire disk for defective tracks;
- and prepares the disk by initializing the directory, FAT and loader.
-
- Syntax: [d:]FORMAT [d:][/S][/1][/8][/V][/B][/4]
-
- Comments: Specify the parameters:
-
- [d:] to specify the drive that contains the disk you want to format.
-
- /S to copy the operating system files from the DOS diskette.
- (The order is IBMBIO.COM, IBMDOS.COM, COMMAND.COM. )
-
- /1 to format the diskette for single sided use.
-
- /8 to format a diskette for 8 sectors per track.
- (Format always physically formats 9/15 sectors per track, but
- instructs DOS to use only 8.)
-
- /V to display the volume prompt for you to name the diskette
- or partition. This is RECOMMENDED.
-
- /B to format for 8 sectors per track, leaving space for IBMBIO.COM
- and IBMDOS.COM.
-
- /4 to format a double-sided diskette in a high-capacity drive.(3.2)
-
- Note: /B can not be used with /V or /S.
-
- Examples: see syntax prompt.
-
- Use for double-sided diskettes to be formatted for single-sided use
- on a single or double-sided drive.
- This is for use with DOS 3.20 to allow you to use a double-sided diskette
- in high capacity drives.
- Formats the disk with eight sectors per track. You can put the system files
- on the diskette with the SYS command, but you can only put version 2 of DOS
- on a diskette formatted with the /8 switch.
- This switch prevents the system modules and command processor being
- placed on the diskette but leaves room for them to be put on by the
- SYS command.
- This switch is used to put IBMBIO.COM, IBMDOS.COM and COMMAND.COM onto
- the diskette. If a system diskette is not in the default drive you will
- be prompted for it.
- This command is recommended so that each diskette can be uniquely
- identified.
- The following is an example.
-
- A>FORMAT b:/S
-
- This command formats the diskette in drive B and copies the system files
- on to the diskette.
-
- FORMAT will prompt you to insert a diskette in drive B.
- Once completed it will give you a disk status report.
-
- Purpose: Transfers control to the line following the one containing the
- appropriate label. A label is inserted in a batch file as a colon(:)
- followed by the label name.
-
- Syntax: GOTO label
-
- Comments: If :label is not defined, the current batch file terminates with
- the message LABEL NOT FOUND. A label can have upto 8 significant
- characters ( a period (.) can not be used ).
-
- Example: eg :foo
- REM looping
- GOTO foo
-
- The lines REM looping ,and GOTO foo will be repeatedly
- displayed.
- Purpose: Loads a table of additional character data for the color/graphics
- adapter into memory.
-
- Syntax: [d:]GRAFTABL
-
- Comments: Specify the parameters.
-
- [d:][path] before GRAFTABL to specify the drive and path that
- contains the GRAFTABL command file.
-
- Use this command for foreign language characters.
-
- Use this command only once.
-
- Once used the system will support ASCII characters 128 through
- 255 in the graphics mode on the graphics adaptor.
- Purpose: To print a graphics display on a compatible printer.
-
- Syntax: [d:]GRAPHICS [printer type][/R][/B]
-
- Comments: Specify the parameters.
-
- [printer type] color1 - color printer/ black ribbon.
- color4 - color printer/ RGB ribbon.
- color8 - color printer/ CMY ribbon.
- compact - compact printer.
- graphics - graphics printer ( default ).
-
- /R prints white on black.
-
- /B prints the background color. (color4 and color8 only).
-
- Examples: A>GRAPHICS color8 /b /r
-
- This will print the screen contents on a color8 printer, printing
- the background colors and black as black.
-
- Purpose: To execute commands depending on a certain condition.
-
- Syntax: IF [NOT] conditional command
-
- Comments: The condition parameter is one of the following:
-
- ERRORLEVEL number ie if the previous program had an exit code of
- number or higher.
-
- string1==string2 eg IF %1 == file.1 ECHO file was file.1
-
- EXIST filespec ie if file.1 exists eg IF file.1 DEL file.1
- Purpose: Logically connects a drive to a directory on another drive to produce
- a single directory structure from two separate directories.
-
- Syntax: [d:]JOIN or [d:]JOIN d: d:\directory or
- [d:]JOIN d: /D
-
- Comments: Specify the parameters.
-
- d: specify the drive to be connected to a directory on another drive.
-
- d:\directory to specify the directory that you will join the drive to.
- The directory must be at the root and only one level deep.
- If the directory does not exist it will be created.
-
- /D disconnects a join.
-
- Examples: see syntax prompt.
-
-
- The following are examples.
-
- A>JOIN
-
- This will display the drives and directories currently joined, eg.
-
- A: => c:\LEVEL1
-
-
- B>JOIN a: c:\drivea
-
- This will join drive A to the path C:\LEVEL1 so that it looks like
-
- C:\
- |
- --------------------
- | | |
-
- FILES REPORTS DRIVEA
-
- NOTE: Once done B>dir a: will be invalid.
-
- Purpose: Sets the maximum number of drives that you may access.
-
- Syntax: LASTDRIVE = x.
-
- Comments: The x can be any alphabetic character A through Z. It represents
- the last valid drive letter that DOS may accept. The default value
- is LASTDRIVE = E.
-
- The minimum number is the number of drives installed.
-
- Example: For a max of 16.
-
- A>LASTDRIVE = p
- Purpose: To join object files to make an execution file.
-
- Syntax: LINK object list,run file,map file,library list /parameters
-
- Comments: The linker program:
-
- * Combines separately produced object modules to produce a .EXE file.
-
- * Searches library files for definitions of unresolved
- external references
-
- * Resolves external cross references
-
- * Produces a text file that shows the resolution of external
- references and error messages
-
- Purpose: Sets the way that a printer, a color/Graphics monitor adapter, or
- an Asynchronous Communications Adapter works.
-
- Syntax: [d:]MODE LPT#[:][n][,[m][,P]]
-
- [d:][path]MODE n
-
- [d:][path]MODE [n],m[,T]
-
- [d:][path]MODE COMn[:] baud[,[parity][,[databits][,[stopbits][,P]]]]
-
- [d:][path]MODE LPT#[:]=COM n
-
- Comments: See individual prompts for more information.
-
- Purpose: To create a new sub-directory on a specified disk.
-
- Syntax: MKDIR [d:]path or MD [d:]path
-
- Comments: Specify the parameters:
-
- [d:] to specify the drive letter of the disk on which you want to
- create the subdirectory. If omitted the default is assumed.
-
- [path] to specify the path of directory names.
-
- Notes: You can create as many directories and subdirectories as
- you wish, limited only by available disk space. However, you
- should ensure that the length of any single path ( including
- \'s ) from the root directory is no more than 63 characters.
-
- Example: see syntax prompt.
- The following are examples.
-
- A>MD C:SALARY
-
- This command will create a directory on drive C in the root directory
- with the name SALARY.
-
- A>MKDIR SALARY
-
- This command will create a directory in the current working directory
- on the default drive A, and will name it SALARY.
-
- Purpose: This command is used to set the display width, and to enable/
- disable an external monitor.
-
- Syntax: n [,m[,T]] or n [,x]
-
- Comments: Specify the parameters:
-
- n = 40 or 80 will set characters per line leaving the colour alone.
- BW40 or BW80 will set the characters per line and a B/W monitor.
- CO40 or CO80 will set the characters per line and a color monitor.
- MONO switches the active display to monochrome.
-
- m = Shift display right or left (R or L).
-
- T = Request test pattern for alignment.
-
- x = Enable/disable external monitor with I or E.
- Including the E switch switches the internal monitor to a lower
- resolution for compatibility with RGB scan rates.
-
- Purpose: Initializes the protocol parameters of an asynchronous
- communications port.
-
- Syntax: COMn:baud[,[parity],[databits],[stopbits][,P]]
-
- Comments: Specify the parameters:
-
- n = 1st or 2nd Asynchronous communication port.
-
- baud = rate of 110,150,300,600,1200,2400,4800 or 9600 (1st 2 digits).
- parity = N for none, O for odd or E for even.
- databits = 7 or 8 with 7 as default.
- stopbits = 1 or 2. The default is 2 for 110 otherwise 1.
-
- P can only be used for retry on a serial printer.
-
- Purpose: To redirect output for a printer to a communications port.
-
- Syntax: LPT#:=COMn:
-
- Comments: Specify the parameters:
-
- LPT#: = 1 to 3 as a printer number.
- COMn: = Asynchronous communications port 1 or 2.
-
- NOTE:
-
- The port must be initialised and the P option used if the port is a printer.
-
- This command can be reversed with MODE LPT#:[n][,m].
-
- Purpose: To configure a printer.
-
- Syntax: LPT#:[n][,[m][,P]]
-
- Comments: specify the parameters:
-
- If n or m are missing or invalid then the mode is left unchanged.
-
- # = 1 to 3 as a printer number.
- n = 80 or 132 characters per line.
- m = 6 or 8 lines per inch.
- P = retry time out errors ( retry only stops after ^BREAK or mode)
-
- Example: MODE lpt2:80,6 or 80 characters per line,6 lines per inch.
-
-
- Purpose: Reads data from the standard input device, and displays it one screen
- at a time; displaying --More-- after each screen.
-
- Syntax: [d:]MORE
-
- Comments: Pressing any key causes another screen of data to be sent to
- the standard output device. This process continues until all
- input data is read.
- Purpose: To search the specified directories to locate batch files
- and commands that are not in the working directory.
-
- Syntax: [[d:]path][;][[;[d:]path]..]
-
- Comments: You may specify a list of drives and pathnames,separated by semi-
- colons( NOTE the pathnames must be specified in full and will not
- default to the current directory).
-
- Typing PATH without parameters displays the current path, while
- supplying one semi-colon as a parameter resets the path to null.
- A pathname is a sequence of subdirectory names, followed by
- a file specification, with a slash between each as a delimeter.
- Each full pathname can have up to 63 characters.
-
- If a pathname begins with \ DOS starts its search in the root
- directory.
- . Represents current directory.
- .. Represents parent directory.
- Purpose: Suspends execution of a batch file and displays the message
- Strike a key when ready....
-
- Syntax: PAUSE [ remark ]
-
- Comments: You can insert PAUSE commands within a batch file to display
- messages and to give you the opportunity to change diskettes
- between commands. To resume execution of the batch file, press any
- key except Ctrl-Break.
- Purpose: Prints a queue (list) of data files on the printer while processing
- other DOS commands.
-
- Syntax: [d:]PRINT [[d:][path][filename[.ext]][/C][/P]..][/T]
-
- Comments: Specify the parameters:
-
- [d:[path][filename[.ext]] to specify the files to be printed.
-
- The following switches apply to the preceding file in the list
- and to all following files until a new switch is found.
-
- /T to set the terminate mode - all queued files are cancelled.
-
- /C to set the cancel mode - select which files to cancel.
-
- /P to set the print mode.
-
-
- Example: see syntax prompt.
-
- WARNING: If printing from diskette do not remove it before the printing
- has been completed.
-
-
- This switch will terminate the preceding and following files on the command
- line.
-
- For example.
-
- A>PRINT *.ASM/C *.C
-
- This command will remove all the files with the extensions ASM and C from
- the print queue.
- This switch will turn the print mode on again after a /C. If no switches
- are used /P is assumed.
-
- For example.
-
- A>PRINT A.ASM/C *.C/P
-
- This command will remove A.ASM from the print queue and add all files
- on drive A with the extension C.
-
- Comments: This is information about the possible configuration options
- available for the PRINT command.
-
- /D:device to specify the print device, if PRN is not to be used.
-
- IMPORTANT: If must be the first parameter if used.
-
- /B:buffsize specifies the size of the internal buffer. The default value is
- 512 bytes. Increasing the value of B may enhance the performance
- of the PRINT command.
-
- /U:busytick specifies the number of clock ticks that PRINT waits until the
- print device is available. The default is 1. If PRINT waits longer
- than busytick it gives up its time slice.
-
- /M:maxtick to specify how many clock ticks PRINT can have to print characters
- on the print device. The default is 2 in a possible range of 1 to 255.
-
- /S:timeslice to specify the time-slice value. The default is 8 in a possible
- range from 1 to 255.
-
- /Q:quesiz to specify how many print files you can have in the queue. The default
- is 10 in a possible range from 1 to 32.
- The following are examples.
-
- A>PRINT *.ASM *.C
-
- This command will print all files on drive A with the extensions ASM and C.
-
- A>PRINT *.ASM/C *.C
-
- This command will remove all the files with extensions ASM and C from the
- print queue.
-
- A>PRINT A.ASM/C *.C/P
-
- This command will remove A.ASM from the print queue and add all files
- on drive A with the extension C.
-
- Purpose: To change the DOS system prompt.
-
- Syntax: PROMPT [ prompt-text ]
-
- Comments:
-
- To specify a special prompt enter PROMPT $v where v is one of:
-
- $ Dollar sign
- t Current time.
- d Current date.
- p Current directory for the default drive.
- v Version number.
- n Default drive.
- g > sign. l < sign. q = sign. b | sign.
- _ CRLF sequence.
- h Backspace erase.
- e ASCII code 1B ie escape.
-
- Example: see syntax prompt
- The following example sets the DOS prompt to display the date and time
- as follows:
-
- Time = (current time)
-
- Date = (current date)
-
- A>PROMPT time = $t$_date = $d
-
- Purpose: Recovers files from a disk that has a defective sector. You can
- recover the file that contains the bad sector, minus the sector
- which is then marked as bad. This command can be used to recover
- a directory that has been corrupted.
-
- Syntax: [d:][path]RECOVER [d:][path]filename[.ext] or d:
-
- Comments: Specify the parameters:
-
- [d:][path]filename[.ext] to specify the file you want to recover.
-
- d: to recover the entire disk. ( ie. when a directory is corrupt.)
-
- When a disk is recovered the files are named FILEXXXX.REC where
- XXXX is from 0001 to 9999.
-
- If a filespec is used only one file can be recovered and the name is
- left unchanged.The size could change (but is a multiple of the alloca-
- tion size) and could require editing.
-
- Example: see syntax prompt.
- The following are examples:
-
- A>RECOVER a:myprog
-
- This command recovers the file MYPROG from the diskette in drive A.
-
- Purpose: Displays remarks during the execution of a batch file.
-
- Syntax: REM [remark]
-
- Comments: The remarks are displayed when the batch execution reaches the
- REM command. If ECHO is OFF, then the remarks are not displayed.
- Purpose: Changes the name of the file specified in the first parameter to
- the name and extension given in the second.
-
- Syntax: REN[AME] [d:][path]filename[.ext] filename[.ext]
-
- Comments: You can use the abbreviated form REN for the rename command.
-
- If you use wild cards there is a one to one correspondence between
- the files specified in the first and the second specification.
-
- If the second specification includes a drive it is ignored.
-
- Example: A>REN b:abode home
- Purpose: Selectively replaces files on the target with files of the same
- name from the source. Selectively add files from the source to
- the target.
-
- Syntax: [d:]REPLACE [d:][path]filename[.ext]
- [d:][path][/A][/P][/R][/S][/W]
-
- Comments: Specify the parameters.
-
- [d:][path]filename[.ext] specifies the files on the source to be
- replaced on the target. Wildcard characters are allowed.
-
- /A replaces all files not existing on the target, ie. ADD.
-
- /P prompts you as each file is encountered.
-
- /R replaces target files that are read-only.
-
- /S searches all directories on the target for the files.
-
- /W instructs REPLACE to wait for you to insert a diskette before
- beginning the search for source files.
-
- Notes: /W and /S can not be used togethor.
- Hidden and system files are ignored.
-
- Examples: see syntax prompt.
- The following is an example.
-
- A>REPLACE c:\authors.dir\ex.ple c:\ /s /p
-
- This command replaces all copies of ex.ple on the fixed disk with the
- copy in the subdirectory authors.dir.
-
- NOTE: Hidden and system files are ignored.
- Purpose: Restores one or more backup files from a backup diskette.
-
- Syntax: [d:]RESTORE d: [d:][path]filename[.ext] [/S][/P]
-
- NOTE: d: path or filename must be used.
-
- Comments: Where more than one diskette has been used in a BACKUP RESTORE checks
- the order of the diskettes.
-
- Specify the parameters:
-
- [d:] to specify the drive that contains the BACKUP files (source).
-
- [d:][path]filename[.ext] to specify where to restore them to, and
- which files from the source disk you want.
-
- /S Restores the subdirectories of the specified directory.
- If this switch is not used only the specified directory is used.
-
- /P Issues a prompt before restoring read-only files or files that have
- been modified since the last backup.
-
- Example: see syntax prompt.
-
- Note: The files must have been placed on the diskette with BACKUP.
-
- Purpose: Removes a subdirectory from the specified disk.
-
- Syntax: RMDIR [d:]path or RD [d:]path
-
- Comments: You can not remove a directory containing hidden files.
-
- This command can only be used on an empty directory, see DEL.
-
- The root directory or a parent directory cannot be removed.
-
- Example: A>RD b:\level1\level2
-
- This removes the entry level2 from the directory level1
- Purpose: Installs DOS on a new disk with the keyboard layout, date and time
- format that you select.
-
- CAUTION ** FORMAT is used so all data on target media is lost.
-
- Syntax: [d:]SELECT [[A:|B:]D:[path]]xxx yy
-
- Comments: Specify the parameters:
-
- [A:|B:] specifies the source drive. A is default.
-
- [D:[path]] specifies the target path. B is default.
-
- xxx specifies the country code. eg 044 for United Kingdom.(Telephone)
-
- yy specifies the keyboard code. eg UK for United Kingdom.
-
- Examples: see syntax prompt
- The following is an example.
-
- A>SELECT a: b:\044 uk
-
- This command creates a DOS diskette in drive B and finds the DOS files
- on a diskette in drive A. The codes are for the UK.
-
- Suggestion: read the DOS manual carefully before using this command.
-
- Purpose: This command sets one string value equal to another in the
- command processor environment.
-
- Syntax: SET [string1 = [string2]]
-
- Comments: If no parameters are given the string values in the command
- processor's environment are listed.
-
- If string2 is omitted string1 is removed from the list.
-
- SET can be used in batch files to define replaceable parameters with
- names instead of numbers.
-
-
- Purpose: Loads support for file sharing and diskette change protection.
-
- Syntax: [d:][path]SHARE [/F:filespace][/L:locks]
-
- Comments: Specify the parameters:
-
- /F:fileshare allocates file space in bytes for the area used to record
- the information necessary for file sharing.Each open file requires the
- length of the full name plus 11 bytes. The default is 2K bytes.
-
- /L:lock allocates space for the number of locks you want. The default
- is 20 locks.
-
- If SHARE is loaded all read or write requests are validated against
- the file sharing code.
-
- If you try and install SHARE once it is installed DOS will remind you.
-
- Examples: A>share
-
- This loads file sharing support.
- Purpose: Allows you to specify the name and location of a top-level
- command processor other than COMMAND.COM that is used to
- load the system.
-
- Syntax: SHELL = [d:][path]filename[.ext] [param1][param2]
-
- Comments: System programmers who develop their own top-level command processor
- should remember to include provisions for handling interrupts 22H,23H
- and 24H, and for reading and executing commands.
- Purpose: Allows command lines to make use of more than 10 (%0 through %9)
- replaceable parameters.
-
- Syntax: SHIFT
-
- Comments: Replaceable parameters are numbered %0 through %9.
- Purpose: To read data ( from the standard input device ), sort it,
- and then write it to the standard output device.
-
- Syntax: [d:]SORT [/R][/+ n]
-
- Comments: Specify the parameters:
-
- /R Reverses the sort as in reverse alphabetical.
-
- /+n Sorts columns beginning with column n. Column 1 is default.
-
- Notes: Characters are sorted on their binary values with the exceptions:
-
- * Lowercase letters are converted to uppercase.
-
- * Some characters above 127 are special see manual.
-
- Example: A>DIR | SORT /+14 ..... sort directory from column 14.
- Purpose: Allows you to use a different drive specifier to refer to another
- drive or path.
-
- Syntax: [d:]SUBST d: d:path or [d:][path]SUBST d: /D or [d:][path]SUBST
-
- Comments: Specify the parameters:
-
- d: specifies the drive letter that you want to use to refer to
- another drive or path.
-
- d:path specifies the drive or path that you want to refer to with
- a nickname. The path must start at the root.
-
- /D deletes a substitution. You must specify the drive.
-
- Examples: see syntax prompt.
- For example.
-
- A>SUBST g: c:\level1\level2
-
- This command will allow you to refer to c:\level1\level2\file as
-
- A>dir g:file instead of A>dir c:\level1\level2\file
-
- To delete this substitution type
-
- A>SUBST g: /d
-
- To display the current substitutions type
-
- A>SUBST
-
- Which will give G: => c:\level1\level2
-
- Purpose: To transfer DOS system files ( IBMDOS.COM and IBMBIO.COM )
- from one disk to another.
-
- Syntax: [d:]SYS d:
-
- Comments: Specify the parameters:
-
- d: to specify the disk drive to which you want to transfer the
- operating system files.
-
- SYS can be used to update a diskette containing an earlier version
- of DOS.
-
- Notes: * COMMAND.COM is not transferred by this command.
-
- * FORMAT using /S has the same effect.
-
- * Space must have been left on the diskette by FORMAT /S or
- FORMAT /B.
-
- The ouput from a command will normally go to the screen but by using
- > in the command the output can be redirected to a file or device.
-
- For example
-
- A>DIR > FILE.TST
-
- This command will redirect the directory listing to the file FILE.TST
-
- A>DIR > PRN
-
- This command will redirect the directory listing to the printer.
- Purpose: Permits you to display and set the time known to the system. Whenever
- you create or add to a file, the time is recorded in the directory.
- You can change the time from the console or from a batch file.
-
- Syntax: TIME [hh:mm[:ss[.xx]]]
-
- Comments: Specify the parameters:
-
- hh to specify the hours. Type 1 or 2 numbers from 0 to 23 for
- the hours.
-
- mm to specify the minutes. Type one or two numbers from 0 to 59 for
- the minutes.
-
- ss to specify the seconds. Type one or two numbers from 0 to 59 for
- the seconds.
-
- xx to specify the hundredths of a second. Type one or two numbers from
- 0 to 99 for hundredths of a second.
-
- Purpose: Displays all of the directory paths found on the specified drive,
- and ( optionally ) lists all the files.
-
- Syntax: [d:]TREE [d:][/F]
-
- Comments: Specify the parameters:
-
- [d:] to specify the drive whose directory paths you want to display.
- If not specified, the default drive is used.
-
- [/F] displays the names of the files in each sub-directory.
-
- Example: A>TREE b:/f >tree.lst
-
- This command lists all the directory paths and their files to file
- tree.lst.
-
- If you want to redirect the output of a command to the end of a file and
- therefore leave the original data intact use >> instead of >.
-
- For example
-
- A>DIR >> FILE.TST will put the directory listing at the end of FILE.TST
- Purpose: Displays the contents of the specified file.
-
- Syntax: TYPE [d:][path]filename[.ext]
-
- Comments: The data is unformatted except that the tab characters are expanded
- to an 8-character boundary.
-
- Note: Press Ctrl-Prtsc if you want the output to be printed as it is
- being displayed.
-
- Purpose: Display the DOS version number that you are working with on the
- standard output device.
-
- Syntax: VER
-
- Comments: The DOS version number consists of a single-digit major version
- number, followed by a period, followed by a two-digit minor
- version number.
-
- Example: A>VER
-
- The result on an IBM PC would be:
-
- IBM Personal Computer DOS Version 3.20.
- Purpose: To switch the verification of data written to disk ON or OFF.
-
- Syntax: VERIFY [ON|OFF]
-
- Comments: VERIFY ON remains on until it is turned off through the SET
- VERIFY System Call or a VERIFY OFF command.
-
- When ON DOS performs a verify operation following each disk
- write operation.
- Syntax: VOL [d:]
-
- Purpose: Displays the disk volume label of the specified drive.
-
- Comments: If you do not specify a drive the default drive is assumed.
-
- Example: A>VOL
-
- The result is:
-
- Volume in drive A is MYDISK
-
- A>VOL
-
- The result is if no label:
-
- Volume in drive A has no label
- Purpose: To allow you to create, change or delete a disk's volume label.
-
- Syntax: [d:]LABEL [d:][volume label]
-
- Comments: Specify the parameters:
-
- [d:] to specify the drive letter of the disk you want to label.
-
- [volume label] upto 11 characters for a volume name. See the
- FORMAT /V command.
-
- Purpose: Selectively copy groups of files, which can include lower level
- subdirectories.
-
- Syntax: [d:]XCOPY [d:][path][filename[.ext] [d:][path][filename[.ext]]
- [/A][/D][/E][/M][/P][/S][/V][/W]
-
- Comments: Specify the parameters:
-
- /A Copies only the files with the archive bit set.
-
- /D:date Copies those whose date is later than mm-dd-yy etc.
-
- /E Creates directories even if empty.
-
- /M Copies files with archive bit on then flips it on the source.
-
- /P Prompts you before each copy.
-
- /S Copies files in subdirectories as well.
-
- /V Verify while copying.
-
- /W Wait for a source diskette to be inserted.
-
- Examples: see syntax prompt.
- Where the source must contain d: , path or filename[.ext].
-
- Example: the following directory structures exist.
-
- SOURCE TARGET
-
- C:\LINDA D:\JACK
- \RUTH\ED
- \PETE
-
- A>XCOPY C:\ D:\ /S will produce | A>XCOPY C:\RUTH D:\ /S will produce
- |
- D:\JACK | D:\JACK
- \LINDA | \ED
- \RUTH\ED | \PETE
- \PETE |
- |